public class Add_bit {
    static int  add_bit(int n){
        if(n < 10){
            return n;
        }
        return n % 10 + add_bit(n / 10);
    }

    public static void main(String[] args) {
        System.out.println(add_bit(1234));
    }
}
